#!/usr/env/bin python
# -*- coding: utf-8 -*-

# @Time    : 2021/8/13 23:41|23:41
# @Author  : yangdingyi
# @File    : passhash
# @Software: PyCharm
import hashlib

secret = 'be9cce7ae679fdd9096502016e03b38c884a67cf8658f8ab0ce29653237e9e6f'


def sha256(todo):
    return hashlib.sha256(str(todo).encode()).hexdigest()


def md5(todo):
    return hashlib.md5(str(todo).encode()).hexdigest()


# for value in range(0, 10000000): #可以将数字调大，获取更长的密码
for value in range(10000000, 100000000):  # 可以将数字调大，获取更长的密码
    print('v:', value)
    s = sha256(md5(value))
    if s == secret:
        print(f'find: {s} = {value}')
        break
